# Maintainer: Jonathan Steel <jsteel at archlinux.org>
# Contributor: megadriver <megadriver at gmx dot com>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Daenyth <Daenyth+Arch [at] gmail [dot] com>
# Contributor: kagan <juanynie@mi.madritel.es>
# Contributor: Hans-Kristian Arntzen <maister@archlinux.us>

pkgname=mednafen
pkgver=1.29.0
pkgrel=3
pkgdesc="Command-line multi-system gaming emulator"
url="https://mednafen.github.io"
license=('GPL2')
arch=('loong64' 'x86_64')
depends=('flac' 'sdl2' 'zlib' 'alsa-lib')
makedepends=('mesa' 'glu')
source=(https://mednafen.github.io/releases/files/$pkgname-$pkgver.tar.xz)
md5sums=('61947d5a387ae59ff5e2839438fd61d6')

build() {
  cd $pkgname

  ./configure --prefix=/usr

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  for i in ABOUT-NLS AUTHORS ChangeLog COPYING INSTALL NEWS \
           README{,.DOS,.PORTING} TODO; do
    install -Dm644 $i "$pkgdir"/usr/share/doc/$pkgname/$i
  done
}
